package com.example.zqh.service;

import com.example.zqh.model.RespBean;
import com.example.zqh.pojo.Purchase;
import com.baomidou.mybatisplus.extension.service.IService;

import java.security.Principal;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zqh
 * @since 2022-09-10
 */
public interface OrderService extends IService<Purchase> {
    
    /**
      * @Author: zqh
      * @Date: 
      * @Description: 生成一个订单
    */
    RespBean generateAnOrder(Integer number, Integer food_id, Principal principal);


    /**
      * @Author: zqh
      * @Date:
      * @Description: 取消订单，退款
    */
    RespBean cancelOrder(Integer id, Principal principal);
     
    
    /**
      * @Author: zqh
      * @Date: 
      * @Description: 确定订单以后，该订单将会在数据库中消失（相当于删除订单）
    */
    RespBean deleteOrderInterface(Integer id);
    
    
    /**
      * @Author: zqh
      * @Date: 
      * @Description: 查询属于自己的订单
    */
    RespBean inquireAboutYourOrder(Principal principal);
}
